<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
    <meta name="context-path" th:content="@{/}"/>
    <link rel="stylesheet" th:href="@{/resources/matrix/css/bootstrap.min.css}"/>
    <link rel="stylesheet" th:href="@{/resources/matrix/css/bootstrap-responsive.min.css}"/>
    <link rel="stylesheet" th:href="@{/resources/matrix/css/matrix-style.css}"/>
    <link rel="stylesheet" th:href="@{/resources/matrix/css/matrix-media.css}"/>
    <link rel="stylesheet" th:href="@{/resources/matrix/css/matrix-full.css}"/>
    <link rel="stylesheet" th:href="@{/resources/matrix/font-awesome/css/font-awesome.css}"/>
    <link rel="stylesheet" th:href="@{/resources/layui/css/layui.css}" media="all">
    <link rel="stylesheet" th:href="@{/resources/zTree_v3/css/zTreeStyle/zTreeStyle.css}" type="text/css">
    <link rel="stylesheet" th:href="@{/resources/css/website.css}"/>
    <link rel="stylesheet" th:href="@{/resources/css/tree.css}"/>
</head>
<body class="treebody">
<div class="container-fluid child_main query-form">
    <div class="child_main_content">
        <div id="contentContainer" class="widget-content nopadding">
        </div>
    </div>
    <!--<div class="child_main_tree">
        <div class="widget-box box-tree">
            <div class="widget-title"><span class="icon"> <i class="icon-th"></i> </span>
                <h5>组态树</h5>
            </div>
            <div class="widget-content box-tree-content nopadding">
                <ul id="machineTree" class="ztree"></ul>
            </div>
        </div>
    </div>-->
</div>
</div>
<script th:src="@{/resources/js/jquery.min.js}"></script>
<script th:src="@{/resources/js/jquery-migrate-1.2.1.js}"></script>
<script th:src="@{/resources/matrix/js/jquery.ui.custom.js}"></script>
<script th:src="@{/resources/matrix/js/bootstrap.min.js}"></script>
<script th:src="@{/resources/matrix/js/bootstrap-colorpicker.js}"></script>
<script th:src="@{/resources/matrix/js/bootstrap-datepicker.js}"></script>
<script th:src="@{/resources/matrix/js/masked.js}"></script>
<script th:src="@{/resources/matrix/js/jquery.uniform.js}"></script>
<script th:src="@{/resources/matrix/js/select2.min.js}"></script>
<script th:src="@{/resources/matrix/js/matrix.js}"></script>
<script th:src="@{/resources/matrix/js/jquery.peity.min.js}"></script>
<script th:src="@{/resources/layui/layui.all.js}" charset="utf-8"></script>
<script th:src="@{/resources/zTree_v3/js/jquery.ztree.core.js}"></script>
<script th:src="@{/resources/valid/js/bootstrapValidator.js}"></script>
<script th:src="@{/resources/valid/js/language/zh_CN.js}"></script>
<script th:src="@{/resources/js/website.js}"></script>
<script th:src="@{/resources/js/system.js}"></script>
<script th:src="@{/resources/js/validation_fields.js}"></script>
<script th:src="@{/resources/js/monitor/monitor_tree.js}"></script>
<script th:inline="javascript">
    var contextRoot = $("meta[name='context-path']").attr("content");
    var tree = null;
    /*$(function () {
        tree = new MonitorTree("machineTree", loadDetail);
        tree.init(function () {
            tree.selectFirstDevice();
        });
    });*/

    var loadDetail = function (treeNode) {
        var url = "";
        if (treeNode.nodeType == 1) {
            url = contextRoot + "index/getAreaIndex/" + treeNode.id;
        }
        else if (treeNode.nodeType == 2) {
            url = contextRoot + "getDeviceIndex/" + treeNode.id;
        }
        else if (treeNode.nodeType == 3) {
            url = contextRoot + "getPartIndex/" + treeNode.id;
        }
        else if (treeNode.nodeType == 4) {
            url = contextRoot + "getDynamicPointIndex/" + treeNode.id;
        }
        else if (treeNode.nodeType == 5) {
            url = contextRoot + "getStaticPointIndex/" + treeNode.id;
        }
        $("#contentContainer").load(url);
    }
</script>
</body>
</html>